package com.hezhiqin.springshiro.shiroconfig.realm;

import org.apache.shiro.authc.AuthenticationException;
import org.apache.shiro.authc.AuthenticationInfo;
import org.apache.shiro.authc.AuthenticationToken;
import org.apache.shiro.authz.AuthorizationInfo;
import org.apache.shiro.realm.AuthorizingRealm;
import org.apache.shiro.subject.PrincipalCollection;

/**
 * @program: homeWork
 * @description:
 * @author: hezhiqin
 * @create: 2020-03-08 21:00
 */
public class UserRealm extends AuthorizingRealm {



    
    /**
    *@Description: 执行授权逻辑
    *@Param: 
    *@return: 
    *@Author: hezhiqin
    *@date: 2020/3/8
    */
    @Override
    protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken token) throws AuthenticationException {
        System.out.println("执行授权逻辑");
        return null;
    }

    /**
     *@Description: 执行认证逻辑
     *@Param:
     *@return:
     *@Author: hezhiqin
     *@date: 2020/3/8
     */
    @Override
    protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) {
        System.out.println("执行认证逻辑");
        return null;
    }
}
